<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>实时语音识别测试</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .container {
            background: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 30px;
        }
        .controls {
            text-align: center;
            margin-bottom: 30px;
        }
        button {
            padding: 12px 24px;
            margin: 0 10px;
            border: none;
            border-radius: 5px;
            font-size: 16px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        .start-btn {
            background-color: #4CAF50;
            color: white;
        }
        .start-btn:hover {
            background-color: #45a049;
        }
        .stop-btn {
            background-color: #f44336;
            color: white;
        }
        .stop-btn:hover {
            background-color: #da190b;
        }
        .status {
            text-align: center;
            margin: 20px 0;
            padding: 10px;
            border-radius: 5px;
            font-weight: bold;
        }
        .status.connected {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        .status.disconnected {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        .status.recording {
            background-color: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7;
        }
        .results {
            margin-top: 30px;
        }
        .result-item {
            background-color: #f8f9fa;
            border-left: 4px solid #007bff;
            padding: 15px;
            margin: 10px 0;
            border-radius: 0 5px 5px 0;
        }
        .result-type {
            font-size: 12px;
            color: #6c757d;
            margin-bottom: 5px;
        }
        .result-text {
            font-size: 16px;
            color: #333;
        }
        .audio-level {
            width: 100%;
            height: 20px;
            background-color: #e9ecef;
            border-radius: 10px;
            margin: 10px 0;
            overflow: hidden;
        }
        .audio-level-bar {
            height: 100%;
            background-color: #28a745;
            width: 0%;
            transition: width 0.1s;
        }

        /* 全屏同传大屏样式 */
        .fullscreen-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
            z-index: 9999;
            display: none;
            flex-direction: column;
            color: white;
            font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
            overflow: hidden;
        }

        .fullscreen-overlay.show {
            display: flex;
        }

        /* 顶部控制栏 */
        .fullscreen-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 40px;
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .fullscreen-title {
            font-size: 24px;
            font-weight: bold;
            color: #ffffff;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .status-indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #ff4444;
            animation: pulse 2s infinite;
        }

        .status-indicator.recording {
            background: #44ff44;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .fullscreen-controls {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .control-btn {
            padding: 10px 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            backdrop-filter: blur(10px);
        }

        .control-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.5);
            transform: translateY(-2px);
        }

        .control-btn.stop {
            background: rgba(255, 68, 68, 0.2);
            border-color: rgba(255, 68, 68, 0.5);
        }

        .control-btn.stop:hover {
            background: rgba(255, 68, 68, 0.3);
        }

        /* 主显示区域 */
        .fullscreen-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 40px;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
        }

        .fullscreen-content::-webkit-scrollbar {
            width: 8px;
        }

        .fullscreen-content::-webkit-scrollbar-track {
            background: transparent;
        }

        .fullscreen-content::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 4px;
        }

        /* 当前识别显示 */
        .current-recognition {
            background: linear-gradient(135deg, rgba(68, 68, 255, 0.2), rgba(68, 255, 68, 0.2));
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 30px;
            backdrop-filter: blur(15px);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .current-label {
            font-size: 16px;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .current-text {
            font-size: 32px;
            line-height: 1.4;
            color: #ffffff;
            font-weight: 500;
            min-height: 80px;
            display: flex;
            align-items: center;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        }

        /* 历史记录区域 */
        .history-section {
            flex: 1;
        }

        .history-title {
            font-size: 20px;
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .history-item {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 15px;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            animation: slideInUp 0.5s ease-out;
        }

        .history-item:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }

        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .history-time {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.5);
            margin-bottom: 8px;
        }

        .history-text {
            font-size: 18px;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.5;
        }

        /* 音频可视化 */
        .audio-visualizer {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #4444ff, #44ff44, #ffff44, #ff4444);
            opacity: 0.6;
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.1s ease;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .fullscreen-header {
                padding: 15px 20px;
            }

            .fullscreen-title {
                font-size: 20px;
            }

            .fullscreen-content {
                padding: 20px;
            }

            .current-text {
                font-size: 24px;
            }

            .history-text {
                font-size: 16px;
            }
        }
    </style>
</head>
<body>
   
</body>
</html>
